package com.liming.common.pojo.vo.product;

import com.liming.common.pojo.entity.product.Product;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author liming
 * @date 2025/1/22
 */
@Data
@Schema(description = "商品价格（售价 - 原价）VO")
public class ProductPriceVO {

    @Schema(description = "商品价格（以分为单位，整数型）")
    private Integer price;

    @Schema(description = "商品原价（以分为单位，整数型）")
    private Integer originalPrice;

    public ProductPriceVO(Product product) {
        this.price = product.getPrice();
        this.originalPrice = product.getOriginalPrice();
    }
}
